import { Field, Int, ObjectType } from "@nestjs/graphql";
import { UserTaskItem } from "@prisma/client";
import { BaseEntity } from "../base.entity/base.entity";
import { UserOnTaskEntity } from "../user.on.task.entity/user.on.task.entity";
import { TaskItemEntity } from "../task.item.entity/task.item.entity";

@ObjectType()
export class UserTaskItemEntity extends BaseEntity implements UserTaskItem {
    @Field(() => Int)
    userOnTaskTeacherId: number;
    
    @Field(() => Int)
    taskItemId: number;

    @Field(() => TaskItemEntity, { nullable: true })
    item: TaskItemEntity

    @Field(() => UserOnTaskEntity, { nullable: true })
    UserOnTask: UserOnTaskEntity

    @Field(() => Int, { nullable: true })
    userOnTaskUserId: number;

    @Field(() => Int, { nullable: true })
    userOnTaskTaskId: number;

    @Field(() => Int)
    score: number

}
